/*
 * @Author: zlc
 * @Date: 2022-07-26 14:33:24
 * @LastEditTime: 2022-07-28 16:13:41
 * @LastEditors: zlc
 * @Description: ''
 * @FilePath: \teachernotice\vue.config.js
 */
require('./modifyManifest.js')
const {
	JXY_PROJECT_ENUM,
	YXB_PROJECT_ENUM,
	USE_PROJECT_ENUM
} = require('./project/projectEnum.js')
const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = {
	/* chainWebpack: config => {
	    config
	      .plugin('define')
	      .tap(args => {
	        args[0]['process.env'].WX_PROJECT_NAME = process.env.WX_PROJECT_NAME
	        return args
	      })
	  } , */
	configureWebpack: {
		plugins: [
			new CopyWebpackPlugin([

				{
					from: path.join(__dirname, '/staticA'),
					to: path.join(__dirname + '/unpackage/', 'dist', process.env.UNI_SCRIPT ===
						JXY_PROJECT_ENUM && process.env.NODE_ENV ===
						'production' ? 'build' : 'dev', process.env.UNI_PLATFORM, 'staticA')
				},
				{
					from: path.join(__dirname, '/staticB'),
					to: path.join(__dirname + '/unpackage/', 'dist', process.env.UNI_SCRIPT ===
						YXB_PROJECT_ENUM && process.env.NODE_ENV === 'production' ? 'build' : 'dev',
						process.env.UNI_PLATFORM, 'staticB')
				}
			])
		],
	},
	
	
}
